package org.estela.stats;

public class Statistics {

	/** Constant for normal distribution. */
	public static double NORM_CONST = Math.sqrt(2 * Math.PI);

	/**
	 * Density function of normal distribution.
	 */
	public static double normalDens(double x, double mean, double stdDev) {

		double diff = x - mean;

		return (1 / (NORM_CONST * stdDev))
				* Math.exp(-(diff * diff / (2 * stdDev * stdDev)));
	}	
}
